var PageModbusInterlock = {
    id: "PageModbusInterlock",//页面ID
    menu: "i18n.lan.menu.modbus",//一级菜单名
    title: "i18n.lan.menu.PageModbusInterlock",//二级菜单名(页面标题)
    icon: "icon-me-interlock",//二级菜单图标(页面图标)
    refreshBtnCmd: "MODBUS_DUMPS",//刷新按钮指令
    saveBtn: true,//保存按钮启用
    el: [//控件数组
        {
            elname: "datagrid",
            rowCount: Device.getNodesCount("reg"), //必选,行数
            data: {
                width: 940,
                height: "400px",
                columns: [[
                    {
                        field: "index",
                        width: 40,
                        align: "center",
                    },
                    {
                        field: "highInterlock",
                        formatter: Easyui.formatter.combobox,
                        editor: new Easyui.editor.Combobox(Device.getDoItemsKV()),
                        dumpKey: "MREG<n>NODE_OC",
                        dumpParamIndex: 0,
                        cmdKey: "MODBUSREG<n>DOHIGH",
                        width: 120,
                    },
                    {
                        field: "highInterlockType",
                        formatter: Easyui.formatter.combobox,
                        editor: new Easyui.editor.Combobox(Device.getDoInterlockTypesKV()),
                        dumpKey: "MREG<n>NODE_OC",
                        dumpParamIndex: 3,
                        cmdKey: "MODBUSREG<n>DOALARMTYPE",
                        width: 110,
                    },              
                    {
                        field: "lowInterlock",
                        formatter: Easyui.formatter.combobox,
                        editor: new Easyui.editor.Combobox(Device.getDoItemsKV()),
                        dumpKey: "MREG<n>NODE_OC",
                        dumpParamIndex: 1,
                        cmdKey: "MODBUSREG<n>DOLOW",
                        width: 120,
                    },
                    {
                        field: "lowInterlockType",
                        formatter: Easyui.formatter.combobox,
                        editor: new Easyui.editor.Combobox(Device.getDoInterlockTypesKV()),
                        dumpKey: "MREG<n>NODE_OC",
                        dumpParamIndex: 4,
                        cmdKey: "MODBUSREG<n>DORECOVERTYPE",
                        width: 110,
                    },
                    {
                        field: "interlockPulseTime",
                        editor: Easyui.editor.numberbox,
                        dumpKey: "MREG<n>NODE_OC",
                        dumpParamIndex: 2,
                        cmdKey: "MODBUSREG<n>DOPULSETO",
                        dealDumpParam:"parseInt(value)/1000",
                        getValue:"value*1000",
                    },
                    {
                        field: "alarmUsercmd",
                        formatter: Easyui.formatter.combobox,
                        editor: new Easyui.editor.Combobox(Device.getUserCmdItemsKV()),
                        dumpKey: "MREG<n>NODE_CMD",
                        dumpParamIndex: 0,
                        cmdKey: "MODBUSREG<n>USERCMDALARM",
                        width: 150,
                    },
                    {
                        field: "recoverUsercmd",
                        formatter: Easyui.formatter.combobox,
                        editor: new Easyui.editor.Combobox(Device.getUserCmdItemsKV()),
                        dumpKey: "MREG<n>NODE_CMD",
                        dumpParamIndex: 1,
                        cmdKey: "MODBUSREG<n>USERCMDRECOVER",
                        width: 150,
                    },
                ]],
            }
        },
    ],
}
CmdPage.add(PageModbusInterlock); //添加到页面管理
